package hoowin.app.wsnd.action;

import java.util.List;

import hoowin.app.wsnd.model.Translation;
import hoowin.app.wsnd.service.TranslationService;
import hoowin.basic.model.User;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class GetTranslations extends ActionSupport {
	private int statusId;
	private TranslationService translationService;
	private User user;
	private List<Translation> translations;
	
	public String execute(){
		if(user.getId()==0||statusId==0)return SUCCESS;
		translations = translationService.getTranslationListByStatusId(statusId);
		return SUCCESS;
	}
	public void setStatusId(int statusId) {
		this.statusId = statusId;
	}

	public int getStatusId() {
		return statusId;
	}

	public void setTranslationService(TranslationService translationService) {
		this.translationService = translationService;
	}

	public TranslationService getTranslationService() {
		return translationService;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public User getUser() {
		return user;
	}

	public void setTranslations(List<Translation> translations) {
		this.translations = translations;
	}

	public List<Translation> getTranslations() {
		return translations;
	}
	
}
